package com.edais.dao;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.edais.domain.CouponsLuckDraw;
import com.edais.persistence.CouponsLuckDrawMapper;

@Repository

public class CouponsLuckDrawDao {
	@Autowired
	private CouponsLuckDrawMapper couponsLuckDrawMapper;
	
	/**
	 * 根据用户ID查询抽奖信息
	 * @param paramsMap
	 * @return
	 */
	public CouponsLuckDraw queryCouponsLuckDrawByUserId(Map<String,Object> paramsMap){
		return this.couponsLuckDrawMapper.queryCouponsLuckDrawByUserId(paramsMap);
	}
	
	/**
	 * 抽奖后更新抽奖表信息
	 * @param couponsLuckDraw
	 */
	public int updateCouponsDrawLuckInfo(CouponsLuckDraw couponsLuckDraw){
	   return this.couponsLuckDrawMapper.updateCouponsDrawLuckInfo(couponsLuckDraw);
	}
	/**
	 * 更新抽奖次数
	 * @param couponsLuckDraw
	 * @return
	 */
	public int updateCouponsDrawLuckInfoById(Map<String,Object> map){
		return this.couponsLuckDrawMapper.updateCouponsDrawLuckInfoById(map);
	}
}
